package com.mxpio.boot.starter.caffeine;

import com.mxpio.framework.caffeine.CaffeineCacheConfiguration;
import com.mxpio.framework.common.CommonConstant;
import com.mxpio.framework.common.vo.ModuleVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 自动装载 缓存模块caffeine实现 mxpio-caffeine
 */
@Configuration
@ConditionalOnClass(CaffeineCacheConfiguration.class)
//@AutoConfigureBefore(SecurityAutoConfiguration.class)
@Import(CaffeineCacheConfiguration.class)
@Slf4j
public class CaffeineCacheAutoConfiguration {

	public CaffeineCacheAutoConfiguration() {
		log.info("[AutoConfiguration==>]:RedisCache Module Loading");
		CommonConstant.addModule(new ModuleVO("CaffeineCache","Caffeine缓存模块"));
	}

}
